package com.openspring.baseinfo.service.impl;

import java.util.List;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.openspring.baseinfo.dao.DistrictDAO;
import com.openspring.baseinfo.model.District;
import com.openspring.baseinfo.service.DistrictService;
import com.openspring.framework.service.AbstractGenericService;

@Service("districtService")
public class DistrictServiceImpl extends AbstractGenericService<District, Long> implements DistrictService {
	
	private DistrictDAO districtDAO;

	@Resource(name="districtDAO")
	public void setDistrictDAO(DistrictDAO districtDAO) {
		super.setGenericDAO(districtDAO);
		this.districtDAO = districtDAO;
	}

	@Override
	public List<District> findChildren(Long parentId) {
		return districtDAO.queryChildren(parentId);
	}
}
